package com.huse.usermanager.controller;


import com.huse.commonutls.ApiResult;
import com.huse.usermanager.service.SysOrgService;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统组织结构表 前端控制器
 * </p>
 *
 * @author xinxin
 * @since 2021-05-27
 */
@CrossOrigin("*")
@RestController
@RequestMapping("/usermanager/sys-org")
public class SysOrgController {
    @Autowired
    private SysOrgService sysOrgService;

    @GetMapping("/orgTree")
    public ApiResult getOrgTree(){
        return ApiResult.ok().data("orgTree",sysOrgService.getOrgTree());
    }
}

